<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" pageEncoding="UTF-8" import="java.util.*,com.hdl.entity.HdlUser"%><!DOCTYPE html><%@ taglib uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"%>
<html>
<head>
<title>个人中心 </title>
<jsp:include page="/head.jsp" />
<link rel="stylesheet" type="text/css" href="assets/css/main.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-table/bootstrap-table.min.css"" />
<script src="assets/plugins/bootstrap-table/bootstrap-table.min.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	
	<div style="background-color: rgb(233, 236, 239);">
		<div class="container-md">
			<nav aria-label="breadcrumb">
				<ol class="breadcrumb">
					<li class="breadcrumb-item"><a href="./">首页</a></li>
					<li class="breadcrumb-item ">个人中心</li>
					<li class="breadcrumb-item active">修改个人信息</li>
				</ol>
			</nav>
		</div>
	</div>
	<div class="container-md">
		<div class="row">
			<div class="col-sm-3 left-menu">
				<div class="card bg-primary">
					<div class="card-header text-white"><i class="fa fa-list mr-2"></i>个人中心</div>
					<div class="list-group">
						<a href="usercenter/user1.jsp" class="list-group-item list-group-item-actionactive }">
							修改个人信息</a> 
						<a href="usercenter/user2.jsp" class="list-group-item list-group-item-action${param.action=='my-2'?' active':'' }">
							修改个人头像</a> 
						<a href="usercenter/user3.jsp" class="list-group-item list-group-item-action">
							修改登录密码</a>
						<a href="usercenter/user4.jsp" class="list-group-item list-group-item-action${param.action=='my-4'?' active':'' }">
							收货地址管理</a> 
					</div>
				</div>
				<div class="card bg-primary mt-2">
					<div class="card-header text-white"><i class="fa fa-list mr-2"></i>我的订单</div>
					<div class="list-group">
						<a href="usercenter/order1.jsp" class="list-group-item list-group-item-action${param.action=='o-0'?' active':'' }">
							待付款</a>
						<a href="usercenter/order2.jsp" class="list-group-item list-group-item-action${param.action=='o-1'?' active':'' }">
							待发货</a>
						<a href="usercenter/order3.jsp" class="list-group-item list-group-item-action${param.action=='o-2'?' active':'' }">
							待收货</a>
						<a href="usercenter/order4.jsp" class="list-group-item list-group-item-action${param.action=='o-3'?' active':'' }">
							评价/完成</a>
						
					</div>
				</div>
				
				
			 </div>
			<div class="col-sm-9" style="border: solid rgba(0, 0, 0, 0.1) 1px; box-shadow:0 0 .3rem rgba(0, 0, 0, 0.3); border-radius:5px; padding: 10px; z-index:1;">
				
				
				
				<!--   主内容写这里！！！！  -->
	<h2>修改个人资料：</h2>
				<hr />
	  

		      <div class="card container-md">
        <div class="card-body">
          <form name="updateForm" action="uploadUserInfo.let" method="POST">
           <input type="hidden" name="userId" value="1"/>
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>姓名</label>
              <div class="col-sm-9">
                <input   pattern="^[a-zA-Z]\w{2,19}$" name="hdlUserRealname" type="text" placeholder="由3到20个单词字符组成"
                  title="由3到20个单词字符组成" class="form-control" value="${user.hdlUserRealname }">
              </div>
            </div>

            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>eamil</label>
              <div class="col-sm-9">
                <input required="required" class="form-control"  name="hdlUserEmail" value="${user.hdlUserEmail }">
              </div>
            </div>
         
            <c:if test="${user.hdlUserSex == '男' }">
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>性别</label>
              <div class="col-sm-9 pt-2">
             <label class="mr-2"><input type="radio" name="hdlUserSex" value="男" checked>男</label> 
               <label class="mr-2"> <input type="radio" name="hdlUserSex" value="女" >女</label>
              </div>
              </c:if>
              <c:if test="${user.hdlUserSex == '女' }">
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>性别</label>
              <div class="col-sm-9 pt-2">
             <label class="mr-2"><input type="radio" name="hdlUserSex" value="男" >男</label> 
               <label class="mr-2"> <input type="radio" name="hdlUserSex" value="女" checked>女</label>
              </div>
              </c:if>
            </div>
            
            
            <%!
				public String getDate(Date date){
            	return new SimpleDateFormat("yyyy-MM-dd").format(date);
            }            
            %>
            <% 
            	HdlUser user = (HdlUser) session.getAttribute("user");
            %>
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right">出生日期</label>
              <div class="col-sm-9">
               <input type="date" name="hdlUserBirthday"  class="form-control" style="width:auto;" value="<%= getDate(user.getHdlUserBirthday()) %>"/>
              </div>
            </div>
            
            
              <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>联系电话</label>
              <div class="col-sm-9">
                <input  class="form-control"  name="hdlUserPhone" value="${user.hdlUserPhone }">
              </div>
            </div>

           
            

            <div class="form-group row">
              <div class="col-sm-9 offset-sm-3">
                
                <button class="btn btn-danger" type="submit"><i class="fa fa-edit mr-2"></i>修改 </button>
              </div>
            </div>

          </form>
        </div>
      </div>
			
			
			
			
			</div> 
		</div>
	</div> 
	<script type="text/javascript" src="usercenter/order.js"></script>

</body>
</html>
